module.exports = app => {
  // 字段数据类型
  const { STRING, INTEGER } = app.Sequelize;
  // model定义
  const Article = app.model.define('article', {
    id: {
      type:INTEGER,
      primaryKey:true,
    },
    userId: {
      type:INTEGER,
      field:"userId"
    },
    coverUrlList: {
      type:STRING(255),
      field:"coverUrlList"
    },
    title: {
      type:STRING(255),
      field:"title"
    },
    commentCount:{
      type:INTEGER,
      field:"commentCount"
    },
    thumbUpCount:{
      type:INTEGER,
      field:"thumbUpCount",
    },
    readCount:{
      type:INTEGER,
      field:"readCount",
    },
  },{
    freezeTableName: true,
    timestamps: false
  });
  return Article;
};
